package app.foo.planetadnzombiedemo.model;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.view.MotionEvent;

public abstract class BaseModel {
    //位置
    protected int locationX;
    protected int locationY;

    //生存状态
    protected boolean isAlife=true;

    //绘制方法
    public abstract void drawSelf(Canvas canvas, Paint paint);

    //获取当前资源对象的宽度
    public abstract int  getModelWidth();

    public int getLocationX(){return locationX;}
    public void setLocationX(int locationX){this.locationX=locationX;}
    public int getLocationY(){return locationY;}
    public void setLocationY(int locationY){this.locationY=locationY;}
    public boolean isAlife(){return isAlife;}
    public void setAlife(boolean isAlife){this.isAlife=isAlife;}

    public abstract boolean onTouch(MotionEvent event);
}
